import Request from '@/utils/request'

export function flowList(params) {
    return Request.get(
        'flowchart/list',
        params
    )
}

export function flowDetail(flow_id) {
    return Request.get(
        `flowchart/list/${flow_id}`,
    )
}

export function flowAdd(params) {
    return Request.post(
        'flowchart/add',
        params
    )
}

export function flowEdit(flow_id,params) {
    return Request.put(
        `flowchart/edit/${flow_id}`,
        params
    )
}

export function flowDelete(flow_id) {
    return Request.delete(
        `flowchart/edit/${flow_id}`
    )
}

export function flowStepList(params) {
    return Request.get(
        'flowchart/step/list',
        params
    )
}

export function flowTree(flow_id) {
    return Request.get(
        `flowchart/tree/${flow_id}`,
    )
}

export function flowStepAdd(params) {
    return Request.post(
        'flowchart/step/add',
        params
    )
}

export function flowStepEdit(flowStep_id,params) {
    return Request.put(
        `flowchart/step/edit/${flowStep_id}`,
        params
    )
}

export function flowStepDelete(flowStep_id) {
    return Request.delete(
        `flowchart/step/edit/${flowStep_id}`
    )
}
